package day02;

public class meiyuetianshu {
	public static void main(String[] args) {
		int a=Integer.parseInt(args[0]);
		int b=Integer.parseInt(args[1]);
		boolean c=false;
		if ((a%400==0)||(a%4==0&&a%100!=0))
			c=true;
		
		switch (b) {
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		case 12:
			  System.out.println(31);
			break;
		case 4:	
		case 6:	
		case 9:	
		case 11:	
              System.out.println(30);
              break;
		case 2:
			{
			 if (c==true)
			  System.out.println(29);
			else 
				System.out.println(28);
			}
			break;
		default:
			System.out.println("错误的月份");
			break;
		}
	}
}
